package com.acme.bankapp.service.bank;

import java.util.List;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.Client;
import com.acme.bankapp.domain.exceptions.ClientExistsException;

public class BankService {
	
	/**
	 * Add new clients to Bank object, just calls Bank's method
	 * @param bank
	 * @param client
	 */
	public void addClient(Bank bank, Client client) throws ClientExistsException{
		bank.addClient(client);
	}
	
	
	/**
	 * Nothing interesting
	 * @param bank
	 */
	public void printMaximumAmountToWithdraw(Bank bank){
		List<Client> clients = bank.getClients();
		for (Client client: clients){
			System.out.println(client.getMaximumAmountToWithdraw());
		}

	}
}
